package net.jxiny.oschina.synthetical.Adapter;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;

import net.jxiny.oschina.R;
import net.jxiny.oschina.synthetical.enyity.Software;

import java.util.List;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

public class SoftwareAdapter extends BaseQuickAdapter<Software, BaseViewHolder> {

    public SoftwareAdapter(int layoutResId, @Nullable List<Software> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(@NonNull BaseViewHolder helper, Software item) {
        helper.setText(R.id.software_title,item.getName());
        helper.setText(R.id.software_url,item.getUrl());
        helper.setText(R.id.software_count,item.getDescription());
    }
}
